package com.mrd.gtimp.business.entity.hongbao;

import org.hibernate.annotations.GenericGenerator;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * 红包发送记录
 * Created by dengdc on 2016/12/28.
 */
@Entity(name = "T_BIZ_DECLA_HONGBAO_RECORD")
public class DeclarationHongbaoRecord {

	public enum Type {
		customer, auditor;
		public String value() {
			if(this.name().equals(customer.toString())) {
				return "1";
			} else {
				return "0";
			}
		}
	}

	@Id
	@GeneratedValue(generator = "hongbaoRecordGenerator")
	@GenericGenerator(name = "hongbaoRecordGenerator", strategy = "uuid")
	private String	id;
	/**
	 * 报关单ID
	 */
	@Column(name = "DID")
	private String	did;
	/**
	 * 报关单业务编码
	 */
	@Column(name = "BID")
	private String	bid;
	/**
	 * 账号
	 */
	@Column(name = "ACCOUNT")
	private String	account;
	/**
	 * 红包个数
	 */
	@Column(name = "AMOUNT")
	private Integer	amount;

	/**
	 * 发出红包的时间
	 */
	@Column(name = "TIME")
	private Date	time;
	/**
	 * 1已发送，0未发送
	 */
	@Column(name = "STATE")
	private Boolean	sended;

	/**
	 * 红包类型
	 * 是否是客户红包
	 * 0审核人员红包
	 * 1是客户红包
	 */
	@Column(name = "TYPE")
	private String	type;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDid() {
		return did;
	}

	public void setDid(String did) {
		this.did = did;
	}

	public String getBid() {
		return bid;
	}

	public void setBid(String bid) {
		this.bid = bid;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public Boolean getSended() {
		return sended;
	}

	public void setSended(Boolean sended) {
		this.sended = sended;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}
